<?php
//STILL UNDER CONSTRUCTION

/**
 * Description of exercises
 *
 * @author bilde
 */
class exercises extends CI_Controller
{
    	function  __construct()
        {
           parent::__construct();

           //Logged_in control
	   if (!$this->session->userdata('is_logged_in'))
           {
                redirect('/welcome/index', 'refresh');
	   }

	}

        //Load the exercise-view
        function index()
        {
            $data['title'] = 'Exercises';
            $data['main_content'] = 'exercises/exercises_home';
            $data['results'] = $this->model_exercises->listAllExercises();
            $this->load->vars($data);
            $this->load->view('includes/template');
	}

}
?>
